<?php 


/** 
***************************************************
*欢迎使用免费版xSite企业自助建站软件！
*这是一个专业为搜索引擎营销而设计的，极稳定、极易维护的建站软件！
*官方客服：help@php.net.cn
*官方下载网址：http://www.php.net.cn/xsite/ 
***************************************************
**/




if(!defined('IN_SITETEAM')) { exit('Access Denied'); } $product_info_file = $user_data_dir . "/{$category}/{$key}.txt"; if (file_exists($product_info_file)) { $product_info = read_array_file($product_info_file); if (isset($product_info['product_pic']) && is_array($product_info['product_pic']) && count($product_info['product_pic'])) { foreach ($product_info['product_pic'] as $k => $v) { if(!empty($v) && file_exists($v))unlink($v); } } if(!empty($product_info['ptitle']) && file_exists($product_info['ptitle'])){ unlink($product_info['ptitle']); $fileinfo = dirname($product_info['ptitle']) . '/src_' . basename($product_info['ptitle']); if (file_exists($fileinfo)) { @unlink($fileinfo); } } if (unlink($product_info_file)) { $db->delete("{$site_id}_product", " `category` = '{$category}' AND `key` = {$key} "); message("xsite.php?action=product&operation=list&category={$category}" . (!empty($page) ? "&page={$page}" : "")); } else { message("xsite.php?action=product&operation=list&category={$category}", "删除不成功"); } } else { $db->delete("{$site_id}_product", " `category` = '{$category}' AND `key` = {$key} "); message("xsite.php?action=product&operation=list&category={$category}" . (!empty($page) ? "&page={$page}" : "")); } ?>